#include <iostream>

using namespace std;

void test1()
{
    //typename & ref = varable;
    int number = 10;
    int number1 = 20;
    int & ref = number;

    cout << ref << endl;
    cout << &ref << endl;

    //assignment, same as number = number1;
    ref = number1;
    cout << ref << endl;
    cout << &ref << endl;
}

void test2()
{
    int number = 10;
    const int number1 = 20;
    const int & ref = number;
    //int & ref1 = number1; error
    const int ref1 = number1;

    cout << ref << endl;
    cout << &ref << endl;

    //ref = number1; error
    //ref = 100; error
    
    cout << ref1 << endl;
    cout << &ref1 << endl;
}

int main()
{
    test1();
    return 0;
}

